<template>
  <div class="use_array_map">
    <description title="useArrayMap" info="按照原始数组元素顺序依次处理元素。" :desc="details.desc" :param="details.param" :use="details.useDesc" />
  </div>
</template>
<script lang="ts" setup>
  import description from '@/components/description/index.vue'
  import { ArrayConfig } from '../useArrayFilter/config.ts'
  import { UseArrayEnums } from '@/shared/enums/array'
  import  { ref } from 'vue'
  const details = ref()
  details.value = new ArrayConfig(UseArrayEnums.USE_ARRAY_MAP).getConfig()
  import { useArrayMap } from '@vueuse/core'
  const arr = ref([0,2,3,4])
  console.log(useArrayMap(arr, (i: any) => i * 2).value)
</script>